<!DOCTYPE html>





<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 3.9.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=7.4.0">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png?v=7.4.0">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png?v=7.4.0">
  <link rel="mask-icon" href="/images/avatar.svg?v=7.4.0" color="#222">
  <link rel="alternate" href="/atom.xml" title="Anemone's Blog" type="application/atom+xml">
  <meta name="google-site-verification" content="Re5JdegRYzNFco-rC9lYIsvSWIgh5JvyfhuEaZCeFCk">
  <meta name="baidu-site-verification" content="opTC8YN3Pn">

<link rel="stylesheet" href="/css/main.css?v=7.4.0">


<link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">


<script id="hexo-configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '7.4.0',
    exturl: false,
    sidebar: {"position":"left","display":"post","offset":12,"onmobile":false},
    copycode: {"enable":false,"show_result":false,"style":null},
    back2top: {"enable":true,"sidebar":false,"scrollpercent":false},
    bookmark: {"enable":false,"color":"#222","save":"auto"},
    fancybox: false,
    mediumzoom: false,
    lazyload: false,
    pangu: false,
    algolia: {
      appID: 'GB90MXPJ1C',
      apiKey: '05d808da3baf50ac2f2fad2dc3a3cd8f',
      indexName: 'dev_blog',
      hits: {"per_page":20},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    },
    localsearch: {"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":true,"preload":false},
    path: 'search.xml',
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    translation: {
      copy_button: '复制',
      copy_success: '复制成功',
      copy_failure: '复制失败'
    },
    sidebarPadding: 40
  };
</script>

  <meta name="description" content="使用方法GUI入口如果有GUI，直接运行ScanWizard，按照步骤点下去就行了，结束后会在项目文件夹下生成Fortify{ProjName}的bat或sh文件，运行即可开始扫描，结束后会生成Fortify{ProjName}.fpr文件，双击打开可以查看漏洞和检查报告。">
<meta name="keywords" content="白盒扫描,源码安全,Fortify">
<meta property="og:type" content="article">
<meta property="og:title" content="Fortify使用初探">
<meta property="og:url" content="http://anemone.top/whitebox-Fortify使用初探/index.html">
<meta property="og:site_name" content="Anemone&#39;s Blog">
<meta property="og:description" content="使用方法GUI入口如果有GUI，直接运行ScanWizard，按照步骤点下去就行了，结束后会在项目文件夹下生成Fortify{ProjName}的bat或sh文件，运行即可开始扫描，结束后会生成Fortify{ProjName}.fpr文件，双击打开可以查看漏洞和检查报告。">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://anemone.top/whitebox-Fortify使用初探/1570934969767.png">
<meta property="og:image" content="http://anemone.top/whitebox-Fortify使用初探/1570935982602.png">
<meta property="og:image" content="http://anemone.top/whitebox-Fortify使用初探/1570935962839.png">
<meta property="og:image" content="http://anemone.top/whitebox-Fortify使用初探/1570954530446.png">
<meta property="og:image" content="http://anemone.top/whitebox-Fortify使用初探/1571804597569.png">
<meta property="og:updated_time" content="2020-10-18T03:55:32.901Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Fortify使用初探">
<meta name="twitter:description" content="使用方法GUI入口如果有GUI，直接运行ScanWizard，按照步骤点下去就行了，结束后会在项目文件夹下生成Fortify{ProjName}的bat或sh文件，运行即可开始扫描，结束后会生成Fortify{ProjName}.fpr文件，双击打开可以查看漏洞和检查报告。">
<meta name="twitter:image" content="http://anemone.top/whitebox-Fortify使用初探/1570934969767.png">
  <link rel="canonical" href="http://anemone.top/whitebox-Fortify使用初探/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome: false,
    isPost: true,
    isPage: false,
    isArchive: false
  };
</script>

  <title>Fortify使用初探 | Anemone's Blog</title>
  








  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .logo,
  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">
  <div class="container use-motion">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-meta">

    <div>
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Anemone's Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>


<nav class="site-nav">
  
  <ul id="menu" class="menu">
      
      
      
        
        <li class="menu-item menu-item-home">
      
    

    <a href="/" rel="section"><i class="fa fa-fw fa-home"></i>首页</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-about">
      
    

    <a href="/about/" rel="section"><i class="fa fa-fw fa-user"></i>关于</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-tags">
      
    

    <a href="/tags/" rel="section"><i class="fa fa-fw fa-tags"></i>标签</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-categories">
      
    

    <a href="/categories/" rel="section"><i class="fa fa-fw fa-th"></i>分类</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-archives">
      
    

    <a href="/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>归档</a>

  </li>
      <li class="menu-item menu-item-search">
        <a href="javascript:;" class="popup-trigger">
        
          <i class="fa fa-search fa-fw"></i>搜索</a>
      </li>
    
  </ul>

</nav>
  <div class="site-search">
    <div class="popup search-popup">
    <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input" id="search-input"></div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="algolia-results">
  <div id="algolia-stats"></div>
  <div id="algolia-hits"></div>
  <div id="algolia-pagination" class="algolia-pagination"></div>
</div>

  
</div>
<div class="search-pop-overlay"></div>

  </div>
</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
            

          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
      <article itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block post">
    <link itemprop="mainEntityOfPage" href="http://anemone.top/whitebox-Fortify使用初探/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Anemone">
      <meta itemprop="description" content="关注Web安全、移动安全、Fuzz测试和机器学习">
      <meta itemprop="image" content="/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Anemone's Blog">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">Fortify使用初探

          
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              
                
              

              <time title="创建时间：2019-10-23 09:27:49" itemprop="dateCreated datePublished" datetime="2019-10-23T09:27:49+08:00">2019-10-23</time>
            </span>
          
            

            
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2020-10-18 11:55:32" itemprop="dateModified" datetime="2020-10-18T11:55:32+08:00">2020-10-18</time>
              </span>
            
          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/源码安全/" itemprop="url" rel="index"><span itemprop="name">源码安全</span></a></span>

                
                
              
            </span>
          

          
            <span id="/whitebox-Fortify使用初探/" class="post-meta-item leancloud_visitors" data-flag-title="Fortify使用初探" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="使用方法"><a href="#使用方法" class="headerlink" title="使用方法"></a>使用方法</h1><h2 id="GUI入口"><a href="#GUI入口" class="headerlink" title="GUI入口"></a>GUI入口</h2><p>如果有GUI，直接运行ScanWizard，按照步骤点下去就行了，结束后会在项目文件夹下生成Fortify{ProjName}的bat或sh文件，运行即可开始扫描，结束后会生成Fortify{ProjName}.fpr文件，双击打开可以查看漏洞和检查报告。</p><a id="more"></a>
<h2 id="Java项目"><a href="#Java项目" class="headerlink" title="Java项目"></a>Java项目</h2><p>如果是java项目，生成项目时会提示项目缺少依赖，如下图所示：</p>
<p><img src="/whitebox-Fortify使用初探/1570934969767.png" alt="1570934969767"></p>
<p>不能解析的类会严重影响扫描效果（见下文），因此一定要指定第三方依赖位置，但是现在很多项目采用Maven或者Gradle构建，此时除了手工指定lib目录外，还可以通过下面Maven和Gradle项目插件的扫描方法</p>
<h3 id="Maven项目"><a href="#Maven项目" class="headerlink" title="Maven项目"></a>Maven项目</h3><p>若为maven项目，先在<code>.../Fortify/Fortify_SCA_and_Apps_{version}/plugins/maven</code>文件夹下找到<code>maven-plugin-bin.zip</code>解压，然后<code>maven clean install</code>安装到本地仓库：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">unzip maven-plugin-bin.zip -d /tmp/maven-plugin-bin</span><br><span class="line"><span class="built_in">cd</span> /tmp/maven-plugin-bin</span><br><span class="line">./install.sh <span class="comment"># win为install.bat</span></span><br></pre></td></tr></table></figure>
<p>然后在用ScanWizard时第二步，勾选Maven，再简单配置一下maven即可</p>
<p><img src="/whitebox-Fortify使用初探/1570935982602.png" alt="1570935982602"></p>
<p><img src="/whitebox-Fortify使用初探/1570935962839.png" alt="1570935962839"></p>
<h3 id="Gradle项目"><a href="#Gradle项目" class="headerlink" title="Gradle项目"></a>Gradle项目</h3><p>gradle没有图形化入口，怎么用见“CLI入口”章节</p>
<h3 id="加依赖和不加依赖的效果对比"><a href="#加依赖和不加依赖的效果对比" class="headerlink" title="加依赖和不加依赖的效果对比"></a>加依赖和不加依赖的效果对比</h3><p>这里对比一下未加依赖和添加依赖后/用maven插件的扫描结果，用java-sec-code测试，从左到右依次为未加依赖(src)，手工指定lib目录(lib)和maven插件(maven)</p>
<p><img src="/whitebox-Fortify使用初探/1570954530446.png" alt="1570954530446"></p>
<p>可以看到再高危漏洞这里，不加依赖漏掉了XSS、PathManipulation和SQL注入的缺陷，并且在中危和低危漏洞方面的缺陷检出率也远低于加依赖的结果（注意到手动指定lib的中危缺陷比maven插件的多一个，实际上是在lib中有一个缺陷重复了两次）</p>
<h2 id="CLI入口（只针对java）"><a href="#CLI入口（只针对java）" class="headerlink" title="CLI入口（只针对java）"></a>CLI入口（只针对java）</h2><p>GUI虽然好用，但是CLI入口更方便我们封装做二次开发。</p>
<p>看一下官方的手册或者分析一下GUI生成的脚本，可以得知fortify扫描主要分为一下几步</p>
<ol>
<li><p>Extracting Arguments File，生成参数列表，保存到Fortify{ProjName}.sh.args文件中，参数报刊了java的classpath(-cp)，java版本，排除目录，待扫描的目录，由于命令行长度限制所以需要单独保存成文件，生成的实例文件如下(<code>FortifyXXX.sh.args</code>)：</p>
 <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">"-cp"</span></span><br><span class="line"><span class="string">"/home/anemone/all_my_work/whitebox_scanner/downloads/graphql_java_gen-master/support/build/libs/support-0.2.1-sources.jar:/home/anemone/all_my_work/whitebox_scanner/downloads/graphql_java_gen-master/support/build/classes/java/test:/home/anemone/all_my_work/whitebox_scanner/downloads/graphql_java_gen-master/support/build/libs/support-0.2.1-javadoc.jar:/home/anemone/all_my_work/whitebox_scanner/downloads/graphql_java_gen-master/support/build/libs/support-0.2.1.jar"</span></span><br><span class="line"><span class="string">"-source"</span></span><br><span class="line"><span class="string">"1.8"</span></span><br><span class="line"><span class="string">"-exclude"</span> <span class="string">"/home/anemone/all_my_work/whitebox_scanner/downloads/graphql_java_gen-master/**/*.jar"</span></span><br><span class="line"><span class="string">"-exclude"</span> <span class="string">"/home/anemone/all_my_work/whitebox_scanner/downloads/graphql_java_gen-master/**/*.class"</span></span><br><span class="line"><span class="string">"/home/anemone/all_my_work/whitebox_scanner/downloads/graphql_java_gen-master"</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>Cleaning previous scan artifacts，即清除上一次扫描</p>
 <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sourceanalyzer -Xmx14237M -Xms400M -Xss24M -b buildXXX -clean</span><br></pre></td></tr></table></figure>
</li>
<li><p>Translating files，即编译文件到中间语言</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sourceanalyzer -Xmx14237M -Xms400M -Xss24M -b buildXXX @FortifyXXX.sh.args</span><br></pre></td></tr></table></figure>
</li>
<li><p>Testing Difference between Translations，不是太清楚这一步是做啥的</p>
</li>
<li><p>Starting scan，开始扫描</p>
 <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sourceanalyzer -Xmx14237M -Xms400M -Xss24M -b buildXXX  -scan -f result.fpr</span><br></pre></td></tr></table></figure>
</li>
</ol>
<p>那么提炼一下，最简单的命令应该就是：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">sourceanalyzer -Xmx14237M -Xms400M -Xss24M -b buildXXX -clean </span><br><span class="line">sourceanalyzer -Xmx14237M -Xms400M -Xss24M -b buildXXX -cp <span class="string">"lib/xxx.jar:lib/yyy.jar"</span> -<span class="built_in">source</span> 1.8 -exclude <span class="string">"**/*.jar"</span> -exclude <span class="string">"**/*.class"</span> &lt;ProjDir&gt; </span><br><span class="line">sourceanalyzer -Xmx14237M -Xms400M -Xss24M -b buildXXX  -scan -f result.fpr</span><br></pre></td></tr></table></figure>
<p>特别的，maven项目：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sourceanalyzer -b buildxyz mvn clean compile</span><br><span class="line">sourceanalyzer -b buildxyz -scan -f result.fpr</span><br></pre></td></tr></table></figure>
<p>Gradle项目:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sourceanalyzer -b buildxyz gradle clean build .</span><br><span class="line">sourceanalyzer -b buildxyz -scan -f result.fpr</span><br></pre></td></tr></table></figure>
<h1 id="原理浅析"><a href="#原理浅析" class="headerlink" title="原理浅析"></a>原理浅析</h1><p>Fortify使用文档中介绍了其使用的分析器，这里给大家翻译一下</p>
<ul>
<li><p>Buffer</p>
<p>缓冲区溢出分析器，可以显示数据流</p>
</li>
<li><p>Configuration</p>
<p>配置分析器，用来分析项目中的错误配置</p>
</li>
<li><p>Content</p>
<p>HTML内容分析器，除了分析HTML外还会分析PHP，JSP和ASP文件</p>
</li>
<li><p>Control Flow</p>
<p>控制流分析器，用来检测潜在危险的操作序列。通过分析程序中的控制流路径，控制流分析器确定一组操作是否按一定的顺序执行。例如，控制流分析器检测未初始化变量，XML是否正确配置。</p>
</li>
<li><p>Data Flow</p>
<p>数据流分析器，应该是最常见也是效果最好的分析器了。通过污点传播技术，检测用户输入（source）是否会传播到危险函数（sink）点中，一般的XSS、SQLI都是这个分析器扫描出来的。</p>
</li>
<li><p>Higher Order</p>
<p>不知道咋翻译，为动态语言设计的数据流分析器，用来应对高阶函数编程而设计的分析器，高阶函数编程在动态语言（如python，js和swift）中很常见，具体来说即使用匿名表达式生成函数，而该分析器就要跟踪这些匿名函数的数据流。</p>
</li>
<li><p>Semantic</p>
<p>语义分析器，用来发现不安全的函数使用，例如java被废弃的方法和C/C++中的gets()</p>
</li>
<li><p>Structural</p>
<p>结构分析器，不是很清楚原理，文档中说其用来分析死代码，未被声明为static的logger等</p>
</li>
</ul>
<h1 id="与Find-sec-bugs对比"><a href="#与Find-sec-bugs对比" class="headerlink" title="与Find-sec-bugs对比"></a>与Find-sec-bugs对比</h1><p>find-sec-bugs算是一个比较出名的开源java代码审计工具了，这里对比一下扫描质量，还是拿java-sec-code来比较，java-sec-code一列数字表示真实API数/安全API数，其他两扫描器列数字表示检出真实漏洞数/误报数，结合这几个数据可以算出漏报和误报率。</p>
<div class="table-container">
<table>
<thead>
<tr>
<th></th>
<th>java-sec-code</th>
<th>Fortify</th>
<th>Find-sec-bugs</th>
</tr>
</thead>
<tbody>
<tr>
<td>CommandInject/RCE</td>
<td>2+1=3/1</td>
<td>3/1</td>
<td>3/1</td>
</tr>
<tr>
<td>CORS</td>
<td>3/1</td>
<td>1/1</td>
<td>2/1</td>
</tr>
<tr>
<td>Deserialize</td>
<td>2/0</td>
<td>0/0</td>
<td>1/1</td>
</tr>
<tr>
<td>Fastjson</td>
<td>1/0</td>
<td>0/0</td>
<td>0/0</td>
</tr>
<tr>
<td>FileUpload</td>
<td>1/1</td>
<td>1/2</td>
<td>1/2</td>
</tr>
<tr>
<td>IP Forge</td>
<td>1/1</td>
<td>0/0</td>
<td>0/0</td>
</tr>
<tr>
<td>Java RMI</td>
<td>1/0</td>
<td>0/0</td>
<td>0/0</td>
</tr>
<tr>
<td>JSONP</td>
<td>4/1</td>
<td>0/0</td>
<td>0/0</td>
</tr>
<tr>
<td>XXE+OOXML+ XLSX+XStream</td>
<td>9+1+1+1=12/8</td>
<td>6/0</td>
<td>6/0</td>
</tr>
<tr>
<td>PathTraversal</td>
<td>1/1</td>
<td>1/1</td>
<td>1/1</td>
</tr>
<tr>
<td>SpEL</td>
<td>1/0</td>
<td>1/0</td>
<td>1/0</td>
</tr>
<tr>
<td>SQLi</td>
<td>3/4</td>
<td>3/0</td>
<td>1/0</td>
</tr>
<tr>
<td>SSRF</td>
<td>8/1</td>
<td>5/1</td>
<td>3/1</td>
</tr>
<tr>
<td>SSTI（velocity）</td>
<td>1/0</td>
<td>1/0</td>
<td>1/0</td>
</tr>
<tr>
<td>URL Redirect</td>
<td>3/2</td>
<td>2/1</td>
<td>3/1</td>
</tr>
<tr>
<td>URL whitelist Bypass</td>
<td>5/3</td>
<td>0/0</td>
<td>0/0</td>
</tr>
<tr>
<td>XSS</td>
<td>2+4(ssrf)=6/1</td>
<td>6/4</td>
<td>0/0</td>
</tr>
</tbody>
</table>
</div>
<p>总体对比下来，fortify不是很占优势，主要区别在于反射型XSS——Fortify检测到6个而Find-sec-bugs没有检测到，SSRF——Fortify多检出2个，但这些差异估计是由于规则导致的，给Find-sec-bugs增加一些source和sink点就能够弥补。</p>
<p>另外，Find-sec-bugs发现两处密码硬编码而Fortify未发现：</p>
<p><img src="/whitebox-Fortify使用初探/1571804597569.png" alt="1571804597569"></p>

    </div>

    
    
    
        
      
        

<div>
<ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者： </strong>Anemone</li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="http://anemone.top/whitebox-Fortify使用初探/" title="Fortify使用初探">http://anemone.top/whitebox-Fortify使用初探/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" rel="noopener" target="_blank"><i class="fa fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！</li>
</ul>
</div>

      

      <footer class="post-footer">
          
            
          
          <div class="post-tags">
            
              <a href="/tags/白盒扫描/" rel="tag"># 白盒扫描</a>
            
              <a href="/tags/源码安全/" rel="tag"># 源码安全</a>
            
              <a href="/tags/Fortify/" rel="tag"># Fortify</a>
            
          </div>
        

        

          <div class="post-nav">
            <div class="post-nav-next post-nav-item">
              
                <a href="/ctf-2019“安恒杯”WEB安全测试秋季练习题wp/" rel="next" title="2019“安恒杯”WEB安全测试秋季大赛练习题wp">
                  <i class="fa fa-chevron-left"></i> 2019“安恒杯”WEB安全测试秋季大赛练习题wp
                </a>
              
            </div>

            <span class="post-nav-divider"></span>

            <div class="post-nav-prev post-nav-item">
              
                <a href="/ml-半监督机器学习学习笔记/" rel="prev" title="半监督机器学习模型学习笔记">
                  半监督机器学习模型学习笔记 <i class="fa fa-chevron-right"></i>
                </a>
              
            </div>
          </div>
        
      </footer>
    
  </div>
  
  
  
  </article>

  </div>


          </div>
          
    
    <div class="comments" id="gitalk-container"></div>
  

        </div>
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">
        
        
        
        
      

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#使用方法"><span class="nav-number">1.</span> <span class="nav-text">使用方法</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#GUI入口"><span class="nav-number">1.1.</span> <span class="nav-text">GUI入口</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Java项目"><span class="nav-number">1.2.</span> <span class="nav-text">Java项目</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Maven项目"><span class="nav-number">1.2.1.</span> <span class="nav-text">Maven项目</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Gradle项目"><span class="nav-number">1.2.2.</span> <span class="nav-text">Gradle项目</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#加依赖和不加依赖的效果对比"><span class="nav-number">1.2.3.</span> <span class="nav-text">加依赖和不加依赖的效果对比</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#CLI入口（只针对java）"><span class="nav-number">1.3.</span> <span class="nav-text">CLI入口（只针对java）</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#原理浅析"><span class="nav-number">2.</span> <span class="nav-text">原理浅析</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#与Find-sec-bugs对比"><span class="nav-number">3.</span> <span class="nav-text">与Find-sec-bugs对比</span></a></li></ol></div>
        
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image"
      src="/images/avatar.jpg"
      alt="Anemone">
  <p class="site-author-name" itemprop="name">Anemone</p>
  <div class="site-description" itemprop="description">关注Web安全、移动安全、Fuzz测试和机器学习</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        
          <a href="/archives/">
        
          <span class="site-state-item-count">70</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
    
      
      
      <div class="site-state-item site-state-categories">
        
          
            <a href="/categories/">
          
        
        <span class="site-state-item-count">31</span>
        <span class="site-state-item-name">分类</span>
        </a>
      </div>
    
      
      
      <div class="site-state-item site-state-tags">
        
          
            <a href="/tags/">
          
        
        <span class="site-state-item-count">86</span>
        <span class="site-state-item-name">标签</span>
        </a>
      </div>
    
  </nav>
</div>
  <div class="feed-link motion-element">
    <a href="/atom.xml" rel="alternate">
      <i class="fa fa-rss"></i>RSS
    </a>
  </div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="https://github.com/anemone95" title="GitHub &rarr; https://github.com/anemone95" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i>GitHub</a>
      </span>
    
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="mailto:anemone95@qq.com" title="E-Mail &rarr; mailto:anemone95@qq.com" rel="noopener" target="_blank"><i class="fa fa-fw fa-envelope"></i>E-Mail</a>
      </span>
    
  </div>
  <div class="cc-license motion-element" itemprop="license">
    
  
    <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" class="cc-opacity" rel="noopener" target="_blank"><img src="/images/cc-by-nc-sa.svg" alt="Creative Commons"></a>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2018 – <span itemprop="copyrightYear">2020</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">anemone</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io" class="theme-link" rel="noopener" target="_blank">Hexo</a> 强力驱动 v3.9.0</div>
  <span class="post-meta-divider">|</span>
  <div class="theme-info">主题 – <a href="https://theme-next.org" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a> v7.4.0</div>

        






  
  <script>
  function leancloudSelector(url) {
    return document.getElementById(url).querySelector('.leancloud-visitors-count');
  }
  if (CONFIG.page.isPost) {
    function addCount(Counter) {
      var visitors = document.querySelector('.leancloud_visitors');
      var url = visitors.getAttribute('id').trim();
      var title = visitors.getAttribute('data-flag-title').trim();

      Counter('get', `/classes/Counter?where=${JSON.stringify({ url })}`)
        .then(response => response.json())
        .then(({ results }) => {
          if (results.length > 0) {
            var counter = results[0];
            Counter('put', '/classes/Counter/' + counter.objectId, { time: { '__op': 'Increment', 'amount': 1 } })
              .then(response => response.json())
              .then(() => {
                leancloudSelector(url).innerText = counter.time + 1;
              })
            
              .catch(error => {
                console.log('Failed to save visitor count', error);
              })
          } else {
              Counter('post', '/classes/Counter', { title: title, url: url, time: 1 })
                .then(response => response.json())
                .then(() => {
                  leancloudSelector(url).innerText = 1;
                })
                .catch(error => {
                  console.log('Failed to create', error);
                });
            
          }
        })
        .catch(error => {
          console.log('LeanCloud Counter Error', error);
        });
    }
  } else {
    function showTime(Counter) {
      var visitors = document.querySelectorAll('.leancloud_visitors');
      var entries = [...visitors].map(element => {
        return element.getAttribute('id').trim();
      });

      Counter('get', `/classes/Counter?where=${JSON.stringify({ url: { '$in': entries } })}`)
        .then(response => response.json())
        .then(({ results }) => {
          if (results.length === 0) {
            document.querySelectorAll('.leancloud_visitors .leancloud-visitors-count').forEach(element => {
              element.innerText = 0;
            });
            return;
          }
          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.url;
            var time = item.time;
            leancloudSelector(url).innerText = time;
          }
          for (var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = leancloudSelector(url);
            if (element.innerText == '') {
              element.innerText = 0;
            }
          }
        })
        .catch(error => {
          console.log('LeanCloud Counter Error', error);
        });
    }
  }

  fetch('https://app-router.leancloud.cn/2/route?appId=o5UaCJdPfEG0g7MVxXSMagpT-gzGzoHsz')
    .then(response => response.json())
    .then(({ api_server }) => {
      var Counter = (method, url, data) => {
        return fetch(`https://${api_server}/1.1${url}`, {
          method: method,
          headers: {
            'X-LC-Id': 'o5UaCJdPfEG0g7MVxXSMagpT-gzGzoHsz',
            'X-LC-Key': 'c6IN1PuMV3QPltJcrHfn74Gt',
            'Content-Type': 'application/json',
          },
          body: JSON.stringify(data)
        });
      };
      if (CONFIG.page.isPost) {
        const localhost = /http:\/\/(localhost|127.0.0.1|0.0.0.0)/;
        if (localhost.test(document.URL)) return;
        addCount(Counter);
      } else if (document.querySelectorAll('.post-title-link').length >= 1) {
        showTime(Counter);
      }
    });
  </script>






        
      </div>
    </footer>
  </div>

  
  <script src="//cdn.jsdelivr.net/npm/animejs@3.1.0/lib/anime.min.js"></script>
  <script src="https://cdn.bootcss.com/velocity/1.2.1/velocity.min.js"></script>
  <script src="https://cdn.bootcss.com/velocity/1.2.1/velocity.ui.js"></script>
<script src="/js/utils.js?v=7.4.0"></script><script src="/js/motion.js?v=7.4.0"></script>
<script src="/js/schemes/pisces.js?v=7.4.0"></script>
<script src="/js/next-boot.js?v=7.4.0"></script>



  
  <script>
    (function(){
      var bp = document.createElement('script');
      var curProtocol = window.location.protocol.split(':')[0];
      bp.src = (curProtocol === 'https') ? 'https://zz.bdstatic.com/linksubmit/push.js' : 'http://push.zhanzhang.baidu.com/push.js';
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(bp, s);
    })();
  </script>








  
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/instantsearch.js@2.10.4/dist/instantsearch.min.css">
<script src="//cdn.jsdelivr.net/npm/instantsearch.js@2.10.4/dist/instantsearch.min.js"></script><script src="/js/algolia-search.js?v=7.4.0"></script>











<script>
if (document.querySelectorAll('pre.mermaid').length) {
  NexT.utils.getScript('//cdn.bootcss.com/mermaid/8.2.6/mermaid.min.js', () => {
    mermaid.initialize({
      theme: 'forest',
      logLevel: 3,
      flowchart: { curve: 'linear' },
      gantt: { axisFormat: '%m/%d/%Y' },
      sequence: { actorMargin: 50 }
    });
  }, window.mermaid);
}
</script>




  

  

  

  

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.css">

<script>
  NexT.utils.getScript('//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js', () => {
    var gitalk = new Gitalk({
      clientID: 'f3075553d7b0225df6ca',
      clientSecret: '68362ba87c4cc8e13103afcf729f5bd8ea176a78',
      repo: 'anemone95.github.io',
      owner: 'Anemone95',
      admin: ['Anemone95'],
      id: 'b2a99fc58cb218d1aa210bc38d93cc75',
        language: window.navigator.language || window.navigator.userLanguage,
      
      distractionFreeMode: 'true'
    });
    gitalk.render('gitalk-container');
  }, window.Gitalk);
</script>

</body>
</html>
